let Utils = {
    chartTransferArr(chart){
        let valueNameList = []

        let columnName = chart.axis[0]
          ? chart.axis[0].fieldName
          : "column";
  
        let data = {
          data: {},
        };
  
        for(let val of chart.value){
          valueNameList.push(val.fieldName)
        }
  
        let title = chart.title;
  
        data['data'][columnName] = chart.columns
  
        for(let i = 0; i < valueNameList.length; i++){
          data['data'][valueNameList[i]] = chart.values[i]
        }
  
        data['title'] = title
  
        return data
      },
}

export default Utils